IPython keyboard shortcuts: http://ipython.org/ipython-doc/stable/interactive/notebook.html#keyboard-shortcuts
In [1]:
from __future__ import division, print_function, unicode_literals
%matplotlib inline
import os
import IPython.display
import numpy as np
import utilities
import arrow
import twitter
In [26]:
session = utilities.authenticate()
path_query = os.path.join(os.path.curdir, 'tweets')
# query = 'hobbit desolation smaug'
# query = 'hobbit'
# query = 'Anchorman 2 The Legend Continues'
# query = 'Anchorman'
query = 'Hunger Games'
manager = twitter.Search_Manager(session, query, path_query)
In [27]:
print('\nStatus')
print('------')
print('client_id: {:s}'.format(session.client_id.client_id))
print('Limit: {:d}'.format(manager.api_limit))
print('Remaining: {:d}'.format(manager.api_remaining))
print('Minutes: {:5.2f}'.format(manager.api_minutes))
print()
print('Count: {:d}'.format(manager.count))
In [28]:
manager.search_continuous()
In [29]:
print('\nStatus')
print('------')
print('client_id: {:s}'.format(session.client_id.client_id))
print('Limit: {:d}'.format(manager.api_limit))
print('Remaining: {:d}'.format(manager.api_remaining))
print('Minutes: {:5.2f}'.format(manager.api_minutes))
print()
print('Count: {:d}'.format(manager.count))
In [30]:
Out[30]:
In [ ]: